﻿using Abp.EntityFramework;
using Abp.EntityFramework.Extensions;
using JHT.ABPLearn.IRepositories;
using JHT.ABPLearn.Tasks;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JHT.ABPLearn.EntityFramework.Repositories
{
    public class BackendTaskRepository : ABPLearnRepositoryBase<ABPTasks>, IBackendTaskRepository
    {
        protected BackendTaskRepository(IDbContextProvider<ABPLearnDbContext> dbContextProvider) : base(dbContextProvider)
        {
        }

        public List<ABPTasks> GetTaskByAssignedPersonId(long personId)
        {
            return GetAll().Where(p => p.AssignedPersonId == personId).ToList();
        }
    }
}
